package classfile

type LocalVariableTableAttribute struct {
	localVariableTable []*LocalVariableTable
}

type LocalVariableTable struct {
	startPc uint16
	lineNumber uint16
}

func (self LocalVariableTableAttribute) readInfo(reader *ClassReader) {
	localVariableTableLenght := reader.readUint16()
	self.localVariableTable = make([]*LocalVariableTable, localVariableTableLenght)

	for i := range self.localVariableTable {
		self.localVariableTable[i] = &LocalVariableTable{
			startPc: reader.readUint16(),
			lineNumber: reader.readUint16(),
		}
	}
}